# Maintainer:
pkgname=py3-userpath
pkgver=1.9.1
pkgrel=0
pkgdesc="Python module for adding locations to PATH"
url="https://github.com/ofek/userpath"
arch="noarch"
license="MIT"
depends="py3-click"
makedepends="
	py3-gpep517
	py3-hatchling
	"
checkdepends="
	py3-pytest
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/ofek/userpath/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/userpath-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	SHELL=sh \
	.testenv/bin/python3 -m pytest -p no:warnings
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
a98b000a0968f81131eb5a91822fda72bc38e6aa2b2a85be43974c37155cbf23aa2698dac1969f078bcca1ebcbc9bd5ef71e4437eae691b7358610bcc74859d5  py3-userpath-1.9.1.tar.gz
"
